import React from 'react';
import Skeleton from 'react-loading-skeleton';
import withTimeoutSkeleton from 'components/skeleton';
import './index.scss';

class CommintInfoSkeleton extends React.PureComponent {
  render() {
    const { useForList } = this.props;
    return (
      <div className={`commit-wrapper ${useForList ? 'use-for-list' : 'use-for-card'}`}>
        <div className="commit-wrapper-left">
          <div className="commit-msg">
            <div style={{ marginBottom: 10 }}>
              <Skeleton width={150} height={24} />
            </div>
            <div>
              <Skeleton width={300} height={20} />
            </div>
          </div>
        </div>
        <Skeleton width={120} height={32} />
      </div>
    );
  }
}

export default withTimeoutSkeleton(CommintInfoSkeleton);
